package com.woniuxy04;

class FatherClass{

}
class SonClass extends FatherClass{

}

public class Test01 {
    public static void main(String[] args) {
        FatherClass fc = new FatherClass();
        SonClass sc = new SonClass();
        fc=sc;
        //假转型
        sc= (SonClass) fc;
        System.out.println("cccc");
        System.out.println(fc instanceof SonClass);
        if(fc instanceof SonClass s1){
            System.out.println(s1);
        }
        if(fc instanceof SonClass){
           SonClass s2 = (SonClass) fc;
        }
    }
}
